<template>
	<view class="date">
		{{date}} <text class="week">{{week}}</text>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				week: '',
			};
		},
		props: {
			date: {
				type: String,
				default: ''
			}
		},
		computed: {
			hiddens() {
				console.log("组件接收的日期", this.date)
			}
		},
		mounted() {
			var a = new Date(this.date);
			var h = a.getDay() - 1;
			
			var we = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期天']
			this.week = we[h]
		},
		methods: {

		}
	}
</script>

<style>

</style>
